Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plot legends #349

Merged
merged 5 commits into from
May 7, 2021
Merged

Add plot legends #349

merged 5 commits into from
May 7, 2021

Conversation

EmbersArc
Copy link
Contributor

Closes #348

I don't have much experience with designing widgets yet, so much of what I did here might not be "best practice". Would be great if someone could have a look and maybe give suggestions on how do do things differently.

gif

@EmbersArc EmbersArc marked this pull request as ready for review May 5, 2021 20:19
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks super nice! I left some comments on how you can simplify the legend layouting

egui/src/widgets/plot/legend.rs Outdated Show resolved Hide resolved
egui/src/widgets/plot/mod.rs Outdated Show resolved Hide resolved
egui/src/widgets/plot/mod.rs Outdated Show resolved Hide resolved
egui/src/widgets/plot/mod.rs Outdated Show resolved Hide resolved
egui/src/widgets/plot/legend.rs Outdated Show resolved Hide resolved
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice - thank you! I like the extra touch of highlighting the curve whose legend you hover

@emilk emilk merged commit 838f3e4 into emilk:master May 7, 2021
@EmbersArc EmbersArc deleted the plot-legend branch May 7, 2021 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add legends to the plotting library
2 participants